<?php

namespace App;
use Session;
use Illuminate\Database\Eloquent\Model;
use DB;
header('content-type:text/html;charset=utf8');

class Message_Home extends Model{
    public function lists($data){
        return DB::table('message')->where('user_name',$data['user_name'])->where('user_tel',$data['user_tel'])->first();
    }

    public function changepwd($data){
    	// print_r($data);die;
    	$pwd = md5($data['user_password']);
    	return DB::table('user')->where('user_name',$data['user_name'])->update(['user_password'=>$pwd]);
    }
}
